<nz-input-group nzSearch [nzAddOnAfter]="suffixIconButton">
  <input type="text" nz-input placeholder="filter" [(ngModel)]="filter"/>
</nz-input-group>
<ng-template #suffixIconButton>
  <button nz-button nzType="primary" nzSearch><i nz-icon nzType="search"></i></button>
</ng-template>
<nz-table #smallTable [nzData]="projects" nzSize="small" [nzFrontPagination]="false"
          [nzShowTotal]="totalTemplate"
          [nzTotal]="total" [(nzPageIndex)]="current" [(nzPageSize)]="pageSize"
          [nzShowPagination]="!productId"
          [nzLoading]="loading" [nzLoadingDelay]="300"
          (nzPageIndexChange)="queryAll()" (nzPageSizeChange)="queryAll()"
          nzShowQuickJumper [nzScroll]="{ y: 'calc(100vh - 510px)' }">
  <thead>
  <tr>
    <th>项目名</th>
    <th>ID</th>
  </tr>
  </thead>
  <tbody>
  <tr [ngClass]="{'selected-project':data.pid===selectedProject?.pid,'disable-project':isDisable(data.pid)}"
      *ngFor="let data of smallTable.data"
      (click)="selectProject(data)">
    <td>{{ data.projectName }}</td>
    <td>
      {{data.pid}}
    </td>
  </tr>
  </tbody>
</nz-table>
<ng-template #totalTemplate let-total> 一共 {{ total }} 条数据</ng-template>
<div class="buttons">
  <nz-button-group>
    <button nz-button (click)="cancelEvent()">Cancel</button>
    <button nz-button nzType="primary" (click)="selectedSuccess()" [disabled]="!selectedProject">OK</button>
  </nz-button-group>
</div>
